#ifndef ROLLEDITDIALOG_H
#define ROLLEDITDIALOG_H


#include <QDialog>
#include <QSqlQueryModel>
#include <QSqlTableModel>
#include "rollcadresearchdialog.h"
#include "resulttablemodel.h"

namespace Ui {
class RollEditDialog;
}

class RollEditDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RollEditDialog(QWidget *parent = 0);
    ~RollEditDialog();
    int roll;
private slots:
    void on_addButton_clicked();

    void on_deleteButton_clicked();
    void receiveIdData(QStringList);

    void on_saveButton_clicked();

    void on_cancelButton_clicked();

    void on_upButton_clicked();

    void on_downButton_clicked();

private:
    Ui::RollEditDialog *ui;
    RollCadreSearchDialog *cadreSearchDialog;
    void initTable();
    void initOther();
    ResultTableModel *tableModel;
    QSqlTableModel* getOriginalModel();
};

#endif // ROLLEDITDIALOG_H
